#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by zhangyanqi on 2018/3/15
from multiprocessing.pool import Pool
import os

from core import Core

core = Core()
core.get_cookie()

while True:
    id = input("Enter id:")
    lmid = input("Enter lmid:")
    lbdm = input("Enter lbdm:")
    for i in range(int(lmid), int(lmid) + 15):
        pool = Pool(os.cpu_count())
        pool.apply_async(core.set_vedio_watched, (id, i, lbdm))
    pool.close()
    pool.join()
    isContinue = input("完成，还要继续吗？(y/n)")
    if (isContinue == "y"):
        continue
    else:
        break
